Database systems are commonly employed by organizations to store data for easy and fast access. Accordingly, the database systems may have to be reliable and scalable. For reliability, high availability disaster recovery (HADR) systems may provide a replication scheme to recover/protect data in the event of a hardware or software failure. Therefore, the HADR systems may replicate data changes from a source database, referred to as a primary database, to a target database, referred to as a replication database. For example, when clients modify the primary database using transactions, the modifications are replicated by a replication server in the replication database. For data replication, the primary and the replication databases are synchronized. In synchronous mode, the data is copied in the primary database and the replication database over a network, and the copy is not considered complete when both copies do not succeed. To accomplish HADR and thereby zero data lost, transactions are executed in the synchronous mode. Further, the replication database can replace the primary database without loss of data when the primary database experiences failure.
In HADR systems, transactions may be committed upon receiving an acknowledgement from the replication server that applies the changes to the replicate database. It may be possible to configure a maximum commit wait time for a commit. When such timeout is reached, the primary database may have to switch towards asynchronous mode (i.e., the data in the primary database is not synchronized with the data in the replication database). Therefore, when the system is running in asynchronous mode, there can be a risk of data loss in case of failure of the primary database.